<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

class Config extends Api
{
    protected $noNeedLogin = ['getWechatVersionConfig'];
    protected $noNeedRight = ['*'];

    /**
     * 获取微信版本配置
     */
    public function getWechatVersionConfig()
    {

        $value = Db::name("config")->where(['name' => 'wechat_version'])->value('value');

        // 返回 JSON 响应
        $this->success("获取成功", $value);
    }

}
